<?php

class Application_Form_MultimediaFile extends Zend_Form
{
    public function init()
    {
        $this->setName('MultimediaFile');

        $set_id = new Zend_Form_Element_Hidden('set_id');
        $set_id->addFilter('Int');
		$category_id->setLabel('category_id')
        					  ->addFilter('Int');
        $title = new Zend_Form_Element_Text('title');
        $title->setLabel('title')
              ->setRequired(true)
              ->addFilter('StripTags')
              ->addFilter('StringTrim')
              ->addValidator('NotEmpty');
              
        $slug = new Zend_Form_Element_Text('slug');
        $slug->setLabel('slug')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
		$description = new Zend_Form_Element_Text('description');
        $description->setLabel('description')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
		$content = new Zend_Form_Element_Text('content');
        $content->setLabel('content')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');		
		$image_thumbnail = new Zend_Form_Element_Text('image_thumbnail');
        $image_thumbnail->setLabel('image thumbnail')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
		$num_views = new Zend_Form_Element_Text('num_views');
        $num_views->setLabel('num views')
        					  ->addFilter('Int');			
        					     
		$created_date = new Zend_Form_Element_Text('created_date');
        $created_date->setLabel('created date')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty')
			   ->addValidator('Date');
			   
		$created_user = new Zend_Form_Element_Text('created_user');
        $created_user->setLabel('created user')
        					  ->addFilter('Int');
		$created_user_name = new Zend_Form_Element_Text('created_user_name');
        $created_user_name->setLabel('created user name')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
                              
        $allow_comment = new Zend_Form_Element_Text('allow_comment');
        $allow_comment->setLabel('allow comment')
        					  ->addFilter('Int');
        $ordering = new Zend_Form_Element_Text('ordering');
        $ordering->setLabel('ordering')
        					  ->addFilter('Int');
		$num_comments = new Zend_Form_Element_Text('num_comments');
        $num_comments->setLabel('num_comments')
        					  ->addFilter('Int');	
		$url = new Zend_Form_Element_Text('url');
        $url->setLabel('url')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
		$html_code = new Zend_Form_Element_Text('html_code');
        $html_code->setLabel('html code')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');	
		$is_active = new Zend_Form_Element_Text('is_active');
        $is_active->setLabel('is_active')
        					  ->addFilter('Int');	
		$file_type = new Zend_Form_Element_Text('file_type');
        $file_type->setLabel('file type')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');								  
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');

        $this->addElements(array($set_id, $category_id, $title, $slug, $description, $content, $image_thumbnail, $num_views, $created_date, $created_user, $created_user_name, $allow_comment, $ordering, $num_comments, $url, $html_code, $is_active, $file_type,$submit));
    }
}